#ifndef __GROUP_H_
#define __GROUP_H_

#include <string>
#include <vector>

#include "groupuser.hpp"

using namespace std;

//allgroup表的ORM类
class Group {
public:
	Group(int id = -1, string name = "", string desc = "") :
		m_id(id), m_name(name), m_desc(desc) {
	}

	inline void setId(int id) { m_id = id; }
	inline void setName(string name) { m_name = name; }
	inline void setDesc(string desc) { m_desc = desc; }
	inline int getId() const { return m_id; }
	inline string getName() const { return m_name; }
	inline string getDesc() const { return m_desc; }
	inline const vector<GroupUser>& getUsers() const { return m_users; }
	inline vector<GroupUser>& getUsers() { return m_users; }

private:
	int m_id;
	string m_name;
	string m_desc;
	vector<GroupUser> m_users;
};
#endif // !__GROUP_H_